import React from 'react';
import styles from './MenuList.css';

class MenuList extends React.Component{
    constructor(){
        super();
    }
    render(){
        let {onClick}=this.props;
        return(
            <li className={`${styles.root} ${this.props.isActive?styles.active:''}`} onClick={onClick}>
                <img src={this.props.imgSrc} className={styles.imgstyle}/>
                <p className={styles.ptext}>{this.props.menutext}</p>
            </li>
        )
    }
}
export default MenuList;